import { FC,useEffect, useState } from 'react';
import { useSelector } from 'react-redux';
import { useNavigate } from 'react-router';
import { IState } from '../store/reducer';

const Index: FC<any> = (props:any): JSX.Element => {

    //useSelector 使用状态

     let token= useSelector((state:IState)=>state.token)

     let user= useSelector((state:IState)=>state.userInfo)


    useEffect(()=>{
    },[])

    return (
      <div>
        房间管理
        <div>
            {token}

            <div>
              {user.name}
            </div>
        </div>
      </div>
    )
}
export default Index;